<%@ Control Language="C#" AutoEventWireup="true" CodeFile="FacilityList.ascx.cs" Inherits="admin_FacilityList" %>
<script type="text/javascript">
    var the_url = "";
    function get_text() {
        the_url ="Default.aspx?ctrl=fac_list&search="+ document.getElementById("txtSearch").value;
    }
</script>
<div id="admin_search_box">
    <table>
        <tr>
            <td style="width: 159px">
    <asp:Label ID="Label1" runat="server" Text="Enter the text to search:"></asp:Label></td>
            <td style="width: 100px">
    <input id="txtSearch"  type="text" /></td>
            <td style="width: 100px">
    <a class="c_button" onclick="get_text();" href="javascript:location=the_url">Search</a></td>
        </tr>
    </table>
    <br />
</div>
    <asp:GridView ID="dgrFacilities" runat="server" AutoGenerateColumns="False" CssClass="list_table">
        <Columns>            
            
            <asp:BoundField DataField="Name" HeaderText="Name" />
            <asp:BoundField DataField="Description" HeaderText="Description" />
            <asp:BoundField DataField="Price" HeaderText="Price" />
            <asp:BoundField DataField="Discount" HeaderText="Discount" />
            <asp:TemplateField HeaderText="Published" ItemStyle-HorizontalAlign="center">                
                <ItemTemplate>
                    <asp:CheckBox ID="chkState" runat="server"  Enabled="false" Checked='<%# Bind("State") %>'></asp:CheckBox>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField>
                <ItemTemplate>
                    <a href="Default.aspx?ctrl=facility&mode=1&id=<%#Eval("Id") %>">Edit</a>
                </ItemTemplate>
            </asp:TemplateField>
        </Columns>
    </asp:GridView>
<asp:Label ID="lblPaging" runat="server"></asp:Label>
<script type="text/javascript" language="javascript">    
	window.location.hash="<%=ActiveAccording %>";
</script>